const express = require('express')
const fs =require('fs')
const path =require('path')
const router = express.Router();

router.get("/index/:id/:type",(req,res)=>{
    let url = path.join(__dirname,'../views','index.html');
    let connet = fs.readFileSync(url,"utf-8");
    console.log(req.params);    //打印出{ id: '2' }
    res.send(connet)
})

module.exports =  router